$(document).ready(function(){
	$("#login-bt").click(function(){
		var text = $("#username").attr('value');
		var pass = $("#pass").attr('value');
		
		$("#loading").html("<img src='loader.gif'/>").fadeIn('fast');		
		$.ajax({
			url: "http://localhost/qlc/index.php/home/checklogin",
			type: "post",
			data:"text="+ text +"&pass=" + pass,
			async: true,
			success: function(result){
				$('#loading').fadeOut('fast');
				$("#result").html(result);
				}
	  })
  })
});